<?php
include 'service.php';
$service = new Contact();
$a = $_REQUEST['name'];
$b = $_REQUEST['mobile'];
$c = $_REQUEST['qq'];
$d = $_REQUEST['id'];
$icon = $_FILES['icon'];

try {
    $service->insert($a, $b, $c, $d, $icon);
    header("Refresh:1 ;url=./index3.php");
} catch (Error $error) {
    exit($error->getMessage());
}
